package dao;

import entity.Bill;
import entity.User;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface UserMapper {

    List<User> getUserList(@Param("userName") String userName,@Param("userRole") Integer roleId);

    List<User> getUserByRoleId_foreach_array(Integer [] roleIds);

//    示例12
    List<User> getUserByRoleId_foreach_list (List<Integer> roleList);

//    示例14
    List<User> getUserByConditionMap_foreach_map(Map<String,Object> conditionMap);

//    示例16
    List<User> getUserByRoleId_foreach_map(Map<String,Object> roleMap);

    //示例18
    List<User> getUserList_choose(@Param("userName")String userName, @Param("userRole") Integer roleId,
                                  @Param("userCode")String userCode, @Param("creationDate")Date creationDate);

    //示例20
    int count();
    List<User> getUserList1(@Param("userName")String userName,@Param("userRole") Integer roleId,
                           @Param("from") Integer currentPageNo,@Param("pageSize") Integer pageSize);




    //编码题
    int countBianMa();
    List<User> getUserBianMa(@Param("userName")String userName,@Param("from") Integer currentPageNo,
                             @Param("pageSize") Integer pageSize);
}
